package ru.intr13.test;

import java.util.Properties;

import javax.naming.Context;
import javax.naming.InitialContext;

public class SimpleClient {
	public static void main(String[] arg) throws Exception {
		Properties p = new Properties();
		p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
		p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
		p.put(Context.PROVIDER_URL, "localhost:1099");
		InitialContext ctx = new InitialContext(p);
		SimpleServerRemote server = (SimpleServerRemote) ctx.lookup("SimpleServerBean/remote");
		System.out.println(server.getTime());
		System.out.println(server.getData("kva").getText());
	}
}